package org.asdtiang.study.springaop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
	public static void main(String[] args){
        ApplicationContext appCtx = new ClassPathXmlApplicationContext("conf.xml");
        System.out.println(appCtx.getBean("human").getClass().getName());
     //经典基于的AOP实现
        //ISleep sleeper = (ISleep)appCtx.getBean("humanProxy");
       ///Spring提供的自动代理的功能，能让切点跟通知自动进行匹配
        ISleep sleeper = (ISleep)appCtx.getBean("human");
        sleeper.sleep();
    }
}
